#pragma once
#include "base/function.hpp"
#include "base/noncopyable.h"
#include "base/config.h"

#include <vector>
namespace net_tools{
class Count_down_cond;
class Eventloop;
class Eventloopthreadpool : base::noncopyable{
 public:
  Eventloopthreadpool(eventloop_func func = nullptr,
                      int thread_number = 0,
                      int channel_size = _C::CHANNEL_DEFAULT_SIZE);
  ~Eventloopthreadpool(){};
  net_tools::Eventloop* Get_next_eventloop();
  int Get_thread_number() const;
  std::vector<net_tools::Eventloop*>* Get_ptr_looppool();
 private:
  eventloop_func                     func_;
  int                                thread_number_;
  int                                index;
  std::vector<net_tools::Eventloop*> eventlooppool_;
};

} // namespace net_tools